/* ************************************************************************
> File Name:     main.c
> Author:        zhfu
> mail:          3346897597@qq.com
> Created Time:  2022年05月03日 星期二 15时56分55秒
> Description:   
 ************************************************************************/
#include<stdio.h>
#include"linkedlist.h"

void print_item(link p)
{
    printf("%d\n", p->item);
}

int main(void)
{
    link p = make_node(10);
	insert(p);
	p = make_node(5);
	insert(p);
	p = make_node(90);
	insert(p);
	p = search(5);
	delete(p);
	free_node(p);
	traverse(print_item);
    reverse();
	traverse(print_item);
	destroy();

	p = make_node(100);
	push(p);
	p = make_node(200);
	push(p);
	p = make_node(250);
	push(p);
	while (p = pop()) {
		print_item(p);
		free_node(p);
	}

	return 0;
}
